package com.hopu.oa.dao.plan;

import com.hopu.oa.entity.plan.AoaPlanList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MyPlanDao {

    List<AoaPlanList> queryMyPlan(int id, @Param("index") int index,
                                  @Param("size") int size,
                                  @Param("choose") int choose,
                                  @Param("startTime") String startTime,
                                  @Param("endTime") String endTime,
                                  @Param("userName") String userName);

    @Select("select plan_comment from aoa_plan_list where plan_id = #{planId}")
    String selectCommentById(int planId);

    @Update("update aoa_plan_list set plan_comment=#{planComment} where plan_id = #{planId}")
    int updatePlanComment(int planId, String planComment);


}
